﻿using System.Collections.Generic;

namespace CoreEx.Common.Data
{
    /// <summary>
    /// Represents a generic tabular data structure.
    /// </summary>
    public interface ITable :IEnumerable<IRow>
    {
        /// <summary>
        /// Sets or gets the name of the table.
        /// </summary>
        string TableName { get; set; }

        /// <summary>
        /// Gets an <see cref="IDictionary{TKey,TValue}"/> that contains the columns for this <see cref="ITable"/> instance.
        /// </summary>
        IDictionary<string, IColumn> Columns { get; }        

        /// <summary>
        /// Gets an <see cref="IList{T}"/> that contains the rows for this <see cref="ITable"/> instance.
        /// </summary>
        IList<IRow> Rows { get; }
    }
}